
package com.ishuangmu.controller.admin;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.context.ContextLoader;

import com.ishuangmu.entity.AdminMenu;
import com.ishuangmu.entity.ArcType;
import com.ishuangmu.entity.PageBean;
import com.ishuangmu.service.AdminMenuService;
import com.ishuangmu.service.impl.InitComponent;
import com.ishuangmu.util.ResponseUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

/**
 * 帖子类别后台管理Controller类
 * @author user
 *
 */
@Controller
@RequestMapping("/admin/adminmenu")
public class AdminMenuController {

	@Resource
	private AdminMenuService adminMenuService;
	
	
	@Resource
	private InitComponent initComponent;
	
	
	@RequestMapping("/list")
	public String list(HttpServletResponse response){
		try {
			List<AdminMenu> list=adminMenuService.list();
			JSONObject result=new JSONObject();
			JSONArray jsonArray=JSONArray.fromObject(list);
			result.put("list", jsonArray);
			System.out.println("result:"+result);
			ResponseUtil.write(response, result);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	} 
	
	
}
